package com.zhiyou100.service.impl;

import com.zhiyou100.entity.Source;
import com.zhiyou100.mapper.SourceMapper;
import com.zhiyou100.service.SourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资源实现类
 *
 * @author yang
 * @version 1.0.0
 * @date 2020-08-28 10:02
 */
@Service
public class SourceImpl implements SourceService {
    private SourceMapper sourceMapper;

    @Autowired
    public void setSourceMapper(SourceMapper sourceMapper) {
        this.sourceMapper = sourceMapper;
    }

    @Override
    public void inertOne(Source source) {
        sourceMapper.insertOne(source);
    }

    @Override
    public List<Source> list() {
        return sourceMapper.list();
    }
}
